<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>iframe测试体验页面无刷新</title>

    <script>
        function go() {
            var url=document.getElementById("url").value;
            document.getElementById("iframe1").src=url;
        }
    </script>
</head>
<body>
<div>
    <p>输入网址</p>
    <input type="text" id="url" value="https://www.baidu.com">
    <input type="button"  value="提交" onclick="go()">
</div>
<iframe id="iframe1" src="https://www.baidu.com"  style="width: 100%;height: 500px"></iframe>
</body>
</html>